package com.avetti.commerce.domainmodel;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** @author Hibernate CodeGenerator */
public class Inventory implements Serializable {
    
    
    private static final long serialVersionUID = 1L;

    /** identifier field */
    private Long inventoryid;

    /** nullable persistent field */
    private String code = "";

    /** nullable persistent field */
    private Long itemid;

    /** persistent field */
    private long instock=0;

    /** persistent field */
    private long onorder=0;

    /** nullable persistent field */
    private String subcode="NOCODE";

    /** persistent field */
    private String vendorid="";

    /** nullable persistent field */
    private String attributes = "";

    /** nullable persistent field */
    private String options = "";

    /** nullable persistent field */
    private Short upd=new Short((short) 0);

    /** persistent field */
    private short fullupdate=0;

    /** persistent field */
    private short currentupdate=0;

    /** nullable persistent field */
    private Date lastoutofstock;

    /** nullable persistent field */
    private Date lastinstock;

    /** persistent field */
    private int pickpackdays=0;

    /** persistent field */
    private int nextshipqty=0;

    /** persistent field */
    private Date nextshipdate;

    /** persistent field */
    private int dropshipminqty=0;

    /** persistent field */
    private int dropshipdays=0;

    /** persistent field */
    private int minreorderqty=0;
    
    /** true -- NOT show the inventory value on item page*/
    private boolean hide=false;
    
    //Show Delivery Date Feature on Basket
    private boolean enableEditDeliveryDate=false;
   
    private boolean discontinued;
    
    private boolean thirdpartyinventory;
    
    private String thirdpartycode;

    public boolean isEnableEditDeliveryDate() {
        return enableEditDeliveryDate;
    }

    public void setEnableEditDeliveryDate(boolean enableEditDeliveryDate) {
        this.enableEditDeliveryDate = enableEditDeliveryDate;
    }

    private int minorderqty=0;
    private int defdelivery=0;
    
    /**
     * define several delivery options,
     *
     */
    

    /** full constructor */
    public Inventory(Long inventoryid, String code, Long itemid, long instock, 
            long onorder, String subcode, String vendorid, String attributes, 
            String options, Short upd, short fullupdate, short currentupdate, 
            Date lastoutofstock, Date lastinstock, int pickpackdays, 
            int nextshipqty, Date nextshipdate, int dropshipminqty, 
            int dropshipdays, int minreorderqty) {
        this.inventoryid = inventoryid;
        this.code = code;
        this.itemid = itemid;
        this.instock = instock;
        this.onorder = onorder;
        this.subcode = subcode;
        this.vendorid = vendorid;
        this.attributes = attributes;
        this.options = options;
        this.upd = upd;
        this.fullupdate = fullupdate;
        this.currentupdate = currentupdate;
        this.lastoutofstock = lastoutofstock;
        this.lastinstock = lastinstock;
        this.pickpackdays = pickpackdays;
        this.nextshipqty = nextshipqty;
        this.nextshipdate = nextshipdate;
        this.dropshipminqty = dropshipminqty;
        this.dropshipdays = dropshipdays;
        this.minreorderqty = minreorderqty;
    }

    /** default constructor */
    public Inventory() {
    }

    /** minimal constructor */
    public Inventory(Long inventoryid, long instock, long onorder, 
            String vendorid, short fullupdate, short currentupdate, 
            int pickpackdays, int nextshipqty, Date nextshipdate, 
            int dropshipminqty, int dropshipdays, int minreorderqty) {
        this.inventoryid = inventoryid;
        this.instock = instock;
        this.onorder = onorder;
        this.vendorid = vendorid;
        this.fullupdate = fullupdate;
        this.currentupdate = currentupdate;
        this.pickpackdays = pickpackdays;
        this.nextshipqty = nextshipqty;
        this.nextshipdate = nextshipdate;
        this.dropshipminqty = dropshipminqty;
        this.dropshipdays = dropshipdays;
        this.minreorderqty = minreorderqty;
    }

    public Long getInventoryid() {
        return this.inventoryid;
    }

    public void setInventoryid(Long inventoryid) {
        this.inventoryid = inventoryid;
    }

    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Long getItemid() {
        return this.itemid;
    }

    public void setItemid(Long itemid) {
        this.itemid = itemid;
    }

    public long getInstock() {
        return this.instock;
    }

    public void setInstock(long instock) {
        this.instock = instock;
    }

    public long getOnorder() {
        return this.onorder;
    }

    public void setOnorder(long onorder) {
        this.onorder = onorder;
    }

    public String getSubcode() {
        return this.subcode;
    }

    public void setSubcode(String subcode) {
        this.subcode = subcode;
    }

    public String getVendorid() {
        return this.vendorid;
    }

    public void setVendorid(String vendorid) {
        this.vendorid = vendorid;
    }

    public String getAttributes() {
        return this.attributes;
    }

    public void setAttributes(String attributes) {
        this.attributes = attributes;
    }

    public String getOptions() {
        return this.options;
    }

    public void setOptions(String options) {
        this.options = options;
    }

    public Short getUpd() {
        return this.upd;
    }

    public void setUpd(Short upd) {
        this.upd = upd;
    }

    public short getFullupdate() {
        return this.fullupdate;
    }

    public void setFullupdate(short fullupdate) {
        this.fullupdate = fullupdate;
    }

    public short getCurrentupdate() {
        return this.currentupdate;
    }

    public void setCurrentupdate(short currentupdate) {
        this.currentupdate = currentupdate;
    }

    public Date getLastoutofstock() {
        return this.lastoutofstock;
    }

    public void setLastoutofstock(Date lastoutofstock) {
        this.lastoutofstock = lastoutofstock;
    }

    public Date getLastinstock() {
        return this.lastinstock;
    }

    public void setLastinstock(Date lastinstock) {
        this.lastinstock = lastinstock;
    }

    public int getPickpackdays() {
        return this.pickpackdays;
    }

    public void setPickpackdays(int pickpackdays) {
        this.pickpackdays = pickpackdays;
    }

    public int getNextshipqty() {
        return this.nextshipqty;
    }

    public void setNextshipqty(int nextshipqty) {
        this.nextshipqty = nextshipqty;
    }

    public Date getNextshipdate() {
        return this.nextshipdate;
    }

    public void setNextshipdate(Date nextshipdate) {
        this.nextshipdate = nextshipdate;
    }

    public int getDropshipminqty() {
        return this.dropshipminqty;
    }

    public void setDropshipminqty(int dropshipminqty) {
        this.dropshipminqty = dropshipminqty;
    }

    public int getDropshipdays() {
        return this.dropshipdays;
    }

    public void setDropshipdays(int dropshipdays) {
        this.dropshipdays = dropshipdays;
    }

    public int getMinreorderqty() {
        return this.minreorderqty;
    }

    public void setMinreorderqty(int minreorderqty) {
        this.minreorderqty = minreorderqty;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("inventoryid", getInventoryid())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof Inventory) ) return false;
        Inventory castOther = (Inventory) other;
        return new EqualsBuilder()
            .append(this.getInventoryid(), castOther.getInventoryid())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getInventoryid())
            .toHashCode();
    }
    
    public boolean isHide() {
        return hide;
    }

    public void setHide(boolean hide) {
        this.hide = hide;
    }

    public int getMinorderqty() {
        return minorderqty;
    }

    public void setMinorderqty(int minorderqty) {
        this.minorderqty = minorderqty;
    }

    public int getDefdelivery() {
        return defdelivery;
    }

    public void setDefdelivery(int defdelivery) {
        this.defdelivery = defdelivery;
    }

    public boolean isDiscontinued() {
        return discontinued;
    }

    public void setDiscontinued(boolean discontinued) {
        this.discontinued = discontinued;
    }

    public boolean isThirdpartyinventory() {
        return thirdpartyinventory;
    }

    public void setThirdpartyinventory(boolean thirdpartyinventory) {
        this.thirdpartyinventory = thirdpartyinventory;
    }

    public String getThirdpartycode() {
        return thirdpartycode;
    }

    public void setThirdpartycode(String thirdpartycode) {
        this.thirdpartycode = thirdpartycode;
    }
}
